Import/Export Data    Related Topics

Stores one or several data or memory traces to a file or loads a memory trace from a file. Import or export is selected from a submenu:


Import Complex Data...

Calls up a dialog to load a memory trace from a trace file. Trace files are ASCII files with selectable file format.

The loaded trace data is used to generate a memory trace which is coupled to the active data trace. Import Data corresponds to a standard Open File dialog with an additional checkbox:

On loading data from a trace file, the analyzer displays a list box to select one of the traces stored in the file. The example below shows a Touchstone (*.s2p) file, containing all four 2-port S-parameters; see Trace File Formats. 

Coupling between the imported memory trace and the active data trace implies that the stimulus values of the imported data and of the active trace must be compatible. Compatibility means that the Sweep Type of the two traces must match; the position and number of the sweep points do not have to be the same.

The analyzer checks for compatibility before importing data. The Select Parameter box remains empty if the selected files contains no compatible data.

When a *.s1p file is opened the Select Parameter box indicates the 1-port (reflection) parameter S11, irrespective of the actual S-parameter stored in the file.  

To import a trace file (*.snp or *.csv) you can also use the Windows Explorer and simply double-click the file or drag and drop the file into the NWA application. The imported data generates a memory trace which is coupled to the active data trace.

Remote control:

MMEMory:LOAD:TRACe "<trc_name>","<file_name>"


Export Complex Data...

Calls up a dialog to store data or memory traces to a trace file. Trace files are ASCII files with selectable file format. Data export can serve many purposes, e.g.:

Export Complex Data corresponds to a standard Save As... dialog with an additional panel to specify the export Options. The export options are remembered when the dialog is closed. The Dec. Separator export option is not available for Matlab (*.dat) file export. Touchstone files *.s<n>p contain either a single trace (*.s1p) or the complete set of S-parameters of an n-port and use the point as Dec. Separator; see Trace File Formats.

Selecting an appropriate file format

Use a Touchstone file format to export a fixed number of S-parameter data traces to a file that can be evaluated with applications such as Agilent's Microwave Design System (MDS) and Advanced Design System (ADS). The data must be acquired in a frequency sweep.

Use the ASCII (*.csv) format if you want to do one of the following:

Use a the Matlab (*.dat) format if you want to import and process the trace data in Matlab.

For more information see Trace File Formats.

Remote control:

MMEMory:STORe:TRACe "<trc_name>","<file_name>"[,UNFormatted]


Export Formatted Data...

Calls up a dialog to store data or memory traces with their current trace format to a trace file using a *.csv or *.dat file format. Only the displayed values of the trace (e.g. the logarithmic magnitude, if trace format dB Mag is selected) are exported. Therefore the trace file doesn't necessarily contain the full (complex) information about the trace.

The exported formatted values correspond to the results in the marker info field. For trace formats involving Cartesian diagrams (dB Mag, Real, Imag...), the stimulus value and a single real response value is exported. For circular diagrams, both the real and imaginary part of the response value is exported.

An exported formatted trace can be processed and evaluated in an external application. Re-import into the analyzer is only possible if the complex trace values are available.

Export Complex Data corresponds to a standard Save As... dialog with an additional panel to specify the export Options. The Dec. Separator export option is not available for Matlab (*.dat) file export. Touchstone files *.s<n>p contain either a single trace (*.s1p) or the complete set of S-parameters of an n-port and use the point as Dec. Separator; see Trace File Formats; they are only available if complex trace values are exported (trace formats Polar, Smith, Inverted Smith). The following output options also depend on the trace format.

Selecting an appropriate file format

Use a Touchstone file format to export a fixed number of S-parameter data traces to a file that can be evaluated with applications such as Agilent's Microwave Design System (MDS) and Advanced Design System (ADS). The data must be acquired in a frequency sweep.

Use the ASCII (*.csv) format if you want to do one of the following:

Use a the Matlab (*.dat) format if you want to import and process the trace data in Matlab.

For more information see Trace File Formats.

Remote control:

MMEMory:STORe:TRACe "<trc_name>","<file_name>",FORMatted


Trace File Formats

Trace files are ASCII files with selectable file format. The analyzer provides two classes of trace files:

The trace file formats complement each other; see Selecting an appropriate file format.  


Touchstone files

All Touchstone files contain a header, a comment section, and the actual trace data:

#  HZ   S   RI   R     50.0000

! Rohde & Schwarz ZVA

! Measurement: S11

! 2003-07-07

!

60297750.000000          0.498113   -0.054290   

80297000.000000          0.504888   -0.081229   

...

The header consists of the following data elements:

# specifies beginning of header line (required at top of file).  <Frequency unit> HZ / KHZ / MHZ / GHZ allowed for imported files. The analyzer always uses HZ for exported data.   

<Data file type> at present: S for S-parameter files.   

<Data format> RI for Re/Im, MA for lin. Mag-Phase, DB for dB Mag-Phase. The data format for export files can be selected in the Export Data dialog.   

<Normalizing impedance> Impedance system in which the data was defined. The analyzer uses 50.0000 W.  

Comment lines start with the exclamation mark (!) and may contain any text used for documentation of the trace data file. Any number of comment lines may be inserted before or after the header line.

The trace data depend on the number of ports <n> and the data format. For real and imaginary values (data format = RI) the trace data for each stimulus frequency are arranged as follows:

The stimulus frequencies are arranged in ascending order. If a lin. Mag-Phase (MA) or dB Mag-Phase (DB) data format is selected the real and imaginary S-parameter values Re(Sij), Im(Sij) are replaced by lin Mag(Sij), phase(Sij) or dB Mag(Sij), phase(Sij), respectively.


ASCII (*.csv) files

An ASCII file contains a header and the actual trace data:

freq;reTrc1_S21;imTrc1_S21;reMem2[Trc1]_S21;imMem2[Trc1]_S21;

300000.000000;0.000000;0.000000;0.000000;0.000000;

40499497.487437;0.000000;0.000000;0.000000;0.000000;

80698994.974874;0.494927;-0.065174;0.500833;-0.074866;

120898492.462312;0.497959;-0.111724;0.488029;-0.107375;

...

The header consists of the following data elements:

<Stimulus> stimulus variable: freq for Frequency sweep, power for Power sweep, time for Time sweep, trigger for CW Mode sweep.   

<reTrace1> first response value of first trace: re<Trace_Name>, mag<Trace_Name> or db<Trace_Name> for output format Re/Im, lin. Mag-Phase or dB Mag-Phase, respectively. The data format for export files can be selected in the Export Data dialog.   

<imTrace1>    second response value of first trace: im<Trace_Name> for output format Re/Im, ang<Trace_Name> for output formats lin. Mag-Phase or dB Mag-Phase. The data format for export files can be selected in the Export Data dialog.

<reTrace2>    first response value of second trace: re<Trace_Name>, mag<Trace_Name> or db<Trace_Name> for output format Re/Im, lin. Mag-Phase or dB Mag-Phase, respectively. The data format for export files can be selected in the Export Data dialog.

<imTrace2>...   second response value of second trace: im<Trace_Name> for output format Re/Im, ang<Trace_Name> for output formats lin. Mag-Phase or dB Mag-Phase. The data format for export files can be selected in the Export Data dialog. first response value of second trace. HZ / KHZ / MHZ / GHZ allowed for imported files. The analyzer alway uses HZ for exported data. second response value of first trace: im<Trace_Name> for output format Re/Im, ang<Trace_Name> for output formats lin. Mag-Phase or dB Mag-Phase. The data format for export files can be selected in the Export Data dialog.

The trace data is arranged as described in the header. Different values are separated by semicolons. A semicolon is also inserted before the end of each line.

The stimulus values are arranged in ascending order.


Shift Stimulus Value...

Shifts the active trace in horizontal direction, leaving the positions of all markers unchanged. The positive or negative offset value for the stimulus variable is entered into an input field. The unit depends on the sweep type.

Shift Stimulus Value can be used in Cartesian as well as in polar diagrams. The visible effect depends on the diagram type:

Use a negative offset value to reset a shifted trace to its original position.  

Remote control:

DISPlay:WINDow<Wnd>:TRACe<WndTr>:X:OFFset <numeric_value>


Shift Response Value...

Modifies all points of the active trace by means of an added and/or a multiplied complex constant. The constant complex values are entered in the four input fields of the Shift Response Value dialog.

The units of the constants are adjusted to the format of the active trace. Setting all values to zero (Clear All Values) restores the original trace.   

Effect of the constants

The trace points are modified according to the formula displayed in the lower part of the dialog:

The formula and the different constants are adjusted to the different display formats of a trace:

Shifting the trace by means of constant values is a simple case of trace mathematics. Use the Define Math dialog to define more complicated mathematical operations.  

Remote control:

DISPlay:WINDow<Wnd>:TRACe<WndTr>:Y:OFFset <Magnitude>[, <Phase>, <Real>, <Imag>]

Remote control:

CALCulate<Chn>:MATH:WUNit:STATe ON | OFF


Max Hold On

Enables (if selected) or disables the max hold (peak hold) function for the active trace. With enabled max hold function, the displayed trace shows the maximum values that the analyzer acquired since the start of the measurement.

The max hold process can be restarted any time using Restart Hold. It is also restarted automatically when the channel or trace settings are changed so that the previous measurement results are no longer valid.

Remote control:

CALCulate<Chn>:PHOLd MAX | OFF


Restart Hold

Restarts the max hold (peak hold) function for the active trace, discarding the old maximum measurement results. This softkey has no effect unless Max Hold On is active.

Remote control:

CALCulate<Chn>:PHOLd MAX | OFF